<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
  <head>
    <title>CardioSHARE demo - Constructing queries</title>
    <link rel="icon" href="/cardioSHARE/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="style/cardioSHARE.css" />
  </head>
  <body>
    <div id='outer-frame'>
      <div id='inner-frame'>
  	<div id='header'>
      <h1>CardioSHARE demo</h1>
    </div>
    <div id='content'>
      <h2>Constructing queries</h2>
      <p>CardioSHARE is a unique query system.  Rather than merely searching through the contents of a local database, CardioSHARE uses the criteria specified in a SPARQL query to gather data dynamically from web services.  This functionality enables multiple distributed datasets and programs to be queried using a single interface.</p>
      
      <!--
      <p>The system determines which web services to invoke based on the predicates that are used in the query.  More specifically, CardioSHARE considers each web service as a dynamic generator of RDF triples. For any given service, the subject of the generated triples is the service input, the object is the service output, and the predicate is the relationship between the input and output.  For example, a service which performs a BLAST search generates triples with the predicate "hasHomolog", as shown below.</p>

      <img class="centered" src="images/homologServicePredicate.png"/>
      -->
      
      <p>For this demo, a number of BioMoby services have been annotated with predicates that connect UniProt proteins to related data.   The relationships between these predicates are shown in the diagram below (<a href="predicates.html">the full URIs for the predicates are available <a href="predicates.html">here</a>).</p>
      <div class='figure'>
        <img src='images/predicates-simple.png' width='545' height='747' alt='A representation of the CardioSHARE virtual graph' />
        <p class='caption'>A representation of the CardioSHARE virtual graph</p>
      </div>

      <p>The arrows in the digram above indicate the direction from service input to service output.  Circles represent BioMoby object types and rectangules represent simple strings.  In order to create a successful query, you must choose a path through the diagram that follows these arrows.  Start by specifying a URI for the starting node (e.g.: &lt;http://biomoby.org/PMID/14633995&gt;, the URI for PubMed article 14633995).  From there, choose a path through the virtual graph that follows the arrows in the diagram above.  One example path and its associated query appear below.  <a href="queries.html">More examples are available here</a>.</p>
      <div class='figure'>
        <img src='images/pubmedQuery.png' width='545' height='747' alt='Diagram of example query' />
        <div style='position: absolute; left: 50%; width: 545px; margin-left: -272px;'>
          <p>The query corresponding to the highlighted path through the CardioSHARE virtual graph above asks, "What proteins are the subject of PubMed article 14633995 and what organisms do these proteins belong to?"</p>
          <p>The equivalent SPARQL query is: <xmp style='margin-left: 2em;'>PREFIX up: <http://uniprot/>

SELECT ?protein ?organism
{
 <http://biomoby.org/PMID/14633995> up:isPaperAboutProtein ?protein .
 ?protein up:belongsToOrganism ?organism .
}</xmp></p>
        </div>
      </div>
    </div>
    <div id='footer'>
      <img class="sponsor" style="margin-top: 10px;" src="images/HSFBCY.gif" alt="HSFBCY logo" height="62" width="134"/>
      <img class="sponsor" style="margin-top: 10px;" src="images/CANARIE.png" alt="CANARIE logo" height="62" width="242"/>
      <img class="sponsor" style="margin-top: 16px;" src="images/CIHR.png" alt="CIHR logo" height="62" width="91"/>
      <p>Development of SADI is generously supported by 
        <span class="nobreak">the Heart and Stroke Foundation of B.C. and Yukon</span>,
        <span class="nobreak">the Canadian Institutes of Health Research</span>, and 
        <span class="nobreak">Microsoft Research</span>.
      </p>
      <p>Major funding for the 
        <span class="nobreak"><a href="http://gcbioinformatics.ca">Bioinformatics Innovation Center</a></span>
        is provided by the
        <span class="nobreak">Government of Canada</span> through
        <span class="nobreak">Genome Canada</span> and
        <span class="nobreak">Genome Alberta</span>.
      </p>
      <p style="margin-top: 20px;">
        <img class="sponsor" src="images/GenomeCanada.png" alt="Genome Canada logo" height="116" width="191"/>
        <img class="sponsor" src="images/GenomeAlberta.png" alt="Genome Alberta logo" height="116" width="185"/>
      </p>
    </div> <!-- footer -->
      </div> <!-- inner-frame -->
    </div> <!-- outer-frame -->
  </body>
</html>
